<%--
  Created by IntelliJ IDEA.
  User: 练钰华
  Date: 2025/11/5
  Time: 13:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%-- 引入 JSTL 核心标签库（用于条件判断） --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>员工信息管理系统 - 登录</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
</head>
<body>
<div class="login-box">
  <h2>员工信息管理系统</h2>
  <%-- 显示登录错误提示 --%>
  <c:if test="${not empty errorMsg}">
    <div class="error-msg">${errorMsg}</div>
  </c:if>
  <%-- 登录表单：提交到 LoginServlet --%>
  <form action="${pageContext.request.contextPath}/LoginServlet" method="post">
    <div class="form-group">
      <label for="username">用户名</label>
      <input type="text" id="username" name="username" required placeholder="请输入用户名" value="${param.username}">
    </div>
    <div class="form-group">
      <label for="password">密码</label>
      <input type="password" id="password" name="password" required placeholder="请输入密码">
    </div>
    <button type="submit" class="btn btn-primary">登录</button>
  </form>
  <div style="text-align: center; margin-top: 20px;">
    <span>测试账号：admin / admin123</span>
  </div>
</div>


</body>
</html>
